/**
 * Created by charlie on 18-1-18.
 */
import React from 'react'
import UI from '../components/zhengGaiDan'
import {connect} from 'dva-no-router'
import {bindActionCreators} from 'redux'
import {View} from 'react-native'

class ZhengGaiDan extends React.Component {
    componentWillMount(){
        const {getDetail}=this.props;
        getDetail();
    }
    componentWillUnmount(){
        const {getClean}=this.props;
        getClean();
    }

    render(){
        return(
            <UI  {...this.props} />
        )
    }
}

const actions ={
    getDetail:() =>({type:'zhangGaiDan/getDetail'}),
    getClean:() =>({type:'zhangGaiDan/getClean'})
};
const mapProps = ({zhangGaiDan}) =>({zhangGaiDan});
const mapActions = dispatch =>({
    ...bindActionCreators({...actions},dispatch)
});
export default connect (mapProps,mapActions)(ZhengGaiDan)